// write your code here
import java.util.Scanner;
import java.lang.Math;

public class Main{
    
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        while(sc.hasNext()){
            int num = sc.nextInt(); //代表小猴子的数量
            if(num == 0) break;
            long a = (long)Math.pow(5,num);
            long b = (long)Math.pow(4,num);
            System.out.println((a-4)+" "+(b-4+num));
        }
        sc.close();
    }
}